#include "system.h"

#ifndef CLIENT_H
#define CLIENT_H


struct MsgData {
	PacketHeader PktHdr;
	MailHeader MailHdr;
	char* bufferInfo;	//holds the actual message data
	int syscallNum;
	time_t timestamp;	//timestamp (send time)
};

void Client();

int ClientCreateLock(char *name);

int ClientAcquireLock(char *name);

int ClientReleaseLock(char *name);

int ClientDeleteLock(char *name);

int ClientCreateCV(char *cvName);

int ClientWait(char *lockName, char *cvName);

int ClientSignal(char *lockName, char *cvName);

int ClientBroadcast(char *lockName, char *cvName);

int ClientDeleteCV(char *lockName, char *cvName);

int ClientCreateMV(char *mvName, int arrSize);

int ClientMVGet(char *mvName, int arrIndex);

int ClientMVSet(char *mvName, int arrIndex, int newVal);

int ClientMVDelete(char *mvName);

#endif // CLIENT_H
